package cn.suxiaoxiang.mmskillbar.utils;

import com.google.common.collect.ImmutableMap;
import io.lumine.xikage.mythicmobs.MythicMobs;
import io.lumine.xikage.mythicmobs.io.MythicConfig;
import io.lumine.xikage.mythicmobs.skills.Skill;
import io.lumine.xikage.mythicmobs.skills.SkillCaster;
import io.lumine.xikage.mythicmobs.skills.SkillMetadata;
import io.lumine.xikage.mythicmobs.skills.SkillTargeter;
import org.bukkit.Bukkit;

import java.util.Collections;
import java.util.Optional;

import static io.lumine.xikage.mythicmobs.skills.SkillTrigger.CAST;

/**
 * @author Corder-Suxiaoxiang
 * @UserName 程序员_Suxiaoxiang
 * @date 2025/1/26 12:28
 * @Version 1.0
 */
public class getSkillConfig {
    /**
     * 传递一个Skill对象，返回该Skill的配置信息
     * @Username 程序员-Su_xiaoxiang
     * @date 2025/1/24 15:39
     * @return MythicItem
     */
    public MythicConfig getmmSkillConfig(String skillName){
        // 通过 MythicProvider 获取 Skill 对象
        Skill skill = MythicMobs.inst().getSkillManager().getSkill(skillName).get();
        if (skill.getConfig() == null){
           // Bukkit.getServer().getConsoleSender().sendMessage(skill.getConfig().toString());
            return null;
        }else {

            return skill.getConfig();
        }
    }
}
